package com.example.demo.constant;

public enum WxTemplateSend {

    /**
     * 售后服务状态提醒
     */
    BROCHURE_ID("0", "P3ky7ghOr79dm9Yl4dMAUdrwO7ZJqkWhyUSHaxdWFvk"),

    /**
     * 文档创建成功通知
     */
    STATUS_ID("1", "3usAIi21qA8y2TFQ5N6qloiehW-c0aJjDyl4B_U9fPU"),

    /**
     * 访客来咨询通知
     */
    WITHDRAWALS_SUCCESS_ID("2", "R_nVZ8Hmzhy-nHURU-ZBCXXp2Wv7_JRJ14-DiRcVxPc"),

    /**
     * 服务状态提醒
     */
    SUBSCRIBE_SUCCESS_ID("3", "c5pp3brlfAvsyw1Xd8a_sw8DuuSAWLfyLNkgxQhkGqU");


    private String code;
    private String desc;

    WxTemplateSend(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String codeToDesc(String code) {
        for (WxTemplateSend s : values()) {
            if (s.getCode().equals(code)) {
                return s.getDesc();
            }
        }
        return null;
    }
}
